package leetcode.twopoint;

import leetcode.twopoint.common.TwoPointUtils;

import java.util.Arrays;

class Solution80 {
    public int removeDuplicates(int[] nums) {
        return TwoPointUtils.removeDuplicatesPro(nums);
    }
}

public class leetcode80 {
    public static void main(String[] args) {
        Solution80 solution80 = new Solution80();
        int[] nums = {0,0,1,1,1,1,2,3,3};
        test80(solution80, nums);
    }

    private static void test80(Solution80 solution80, int[] nums) {
        int k = solution80.removeDuplicates(nums);
        System.out.println(k);
        int[] nums2 = new int[k];
        for(int i = 0; i<k;i++){
            nums2[i] = nums[i];
        }
        System.out.println(Arrays.toString(nums2));
    }

}
